package bean;

public class Student {
    private int id;

    private String name;

    public Student(){}

    public Student(int id, String name){
        this.id = id;
        this.name = name;
    }

    @Override
    public boolean equals(Object obj) {
        Student other = (Student) obj;
        if(this.name.equals(other.name))
            return true;
        else
            return false;
    }

    @Override
    public int hashCode() {
        return this.name.hashCode();
    }

    public int getId(){
        return this.id;
    }

    public String getName(){
        return name;
    }
}
